<!--
  To change this template, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
  <head>
    <meta name="layout" content="mobile">
    <title>Phone Numbers</title>
  </head>
  <body>
    <h2>${facility?.name} Phone Numbers</h2>
    </br>
    <table>
    <g:each var="number" in="${facility.phones}">
      <tr>
        <td align="right">${number.phoneType}:</td>
        <td style="padding-left: 10px">${number.number}</td>
        <td align="right" style="padding-left: 10px">
          <a href="deleteNumber?name=${facility.name}&id=${number.id}" data-role="button" data-icon="delete" data-iconpos="notext"></a>
        </td>
      </tr>
    </g:each>
    </table>
    
    <g:form action="editNumbers">
      <g:hiddenField name="name" value="${facility.name}"/>
      <g:select name="phoneType" id="phoneType" from="${['Fax', 'Home', 'Work', 'Cell']}"
                        value="${telephoneNumber?.phoneType}"></g:select>
      <g:textField name="number" value="${telephoneNumber?.number}" />
      
    
  
    <div data-role="controlgroup" data-type="horizontal">
       <a href="view?name=${facility.name}" data-role="button" data-icon="back">Back</a>
       <g:submitButton name="phone" value="Add Number" data-icon="plus"/>
    </div>
    </g:form>
 
  </body>
</html>
